package router

import (
	"g_ansible/api"
	"github.com/gin-gonic/gin"
)

type HostRouter struct {
}

func (h *HostRouter) InitHostRouter(Router *gin.RouterGroup) {
	hostRouter := Router.Group("ansible")
	hostApi := api.ApiGroupApp.HostApi
	{
		hostRouter.GET("host", hostApi.QueryHandler)
		hostRouter.POST("host", hostApi.AddHandler)
		hostRouter.DELETE("host/:group/:host", hostApi.DeleteHandler) // 路径参数方式
		hostRouter.DELETE("host", hostApi.DeleteHandler) // 查询参数方式
	}
}